#ifndef _MENUS_H
#define _MENUS_H

#include <ctype.h>
#include <allegro.h>
#include "globals.h"
#include "data.h"
#include "enemy.h"
#include "player.h"
#include "alleg.h"
#include "map.h"

//Images for title screens and menus
#define TITLE0              0
#define TITLE1              1
#define TITLE2              2
#define TITLE3              3
#define TITLE4              4
#define TITLE5              5
#define TITLE6              6
#define TITLE7              7
#define HIGHSCORE           8

//Images for Options Menu
#define OPTION0             0
#define OPTION1             1
#define OPTION2             2
#define OPTION3             3
#define OPTION4             4
#define OPTION5             5
#define OPTION_SELECT       6

//Return values for the menu

#define EXIT_GAME           1
#define START_GAME          2
#define RESTART_INTRO       3
#define OPTION_MENU         4

//MENU BAR
#define GAME_MENU                       0
#define PLAYER_PROFILE0                 1
#define PLAYER_PROFILE1                 2
#define PLAYER_PROFILE2                 3
#define PLAYER_PROFILE3                 4
#define ENEMY_PROFILE0                  5
#define ENEMY_PROFILE1                  6
#define ENEMY_PROFILE2                  7
#define PLAYER_BAR                      8
#define ENEMY_BAR                       9
#define BAR_FILL                        10    
#define LIVES                           11
#define PAUSE                           12
#define CLASSIC                         13
#define CHANGED                         14
#define GAME_OVER                       15

#define BAR_MAX_FILL                    55
#define HELP_MAP_TEST                   0
#define HELP_GAME                       1

//Global
DATAFILE *status;


int score[6];
int type[6];
int level[6];
char name[6][25];
char difficulty[6][25];

int liney1,
    liney2,
    line1x1,
    line2x1,
    line3x1,
    line4x1,
    line5x1,
    line6x1,
    line7x1,
    line8x1,
    line9x1,
    line10x1,
    line11x1,
    line12x1,
    count_levels,
    scroll_x1,
    scroll_x2;
    
//Prototypes
void check_highscore(BITMAP *back);
    
void draw_help_game_menu(int help);

void draw_game_menu(void);

void add_points(void);

void draw_pause(void);


void screen_fade_in(BITMAP *bmp_orig, int speed);

void screen_fade_out(int speed);

void draw_game_over(BITMAP *gameover_bmp);

void save_highscore(void);

void load_highscore(void);

void check_highscore(BITMAP *back); 

int draw_highscore(void); 

void screen_close(BITMAP *bmp);

int yesno_win(BITMAP *screen_capture,char *txt,int x,int y);

void test_map(void);

int main_option_win(void);

void game_intro(int bass_num);

int game_menu(void);

    
void do_begin(int skip_intro);

int do_game(void);

extern void timer_handle(void);

extern void reset_default(void);

int save_temp_data(void);

int load_temp_data(void);

extern void give_points(int points);

int write_temp_file(void);
int load_temp_file(void);

#endif   
